import request from "@/utils/request";

// 查询岗位工种列表
export function listPost(query) {
  return request({
    url: '/labour/post/list',
    method: 'get',
    params: query
  })
}

// 查询岗位工种下拉列表
export function dropDownList(query) {
  return request({
    url: '/labour/post/dropDownList',
    method: 'get',
    params: query
  })
}

// 新增岗位工种
export function addPost(data) {
  return request({
    url: '/labour/post',
    method: 'post',
    data: data
  })
}

// 查询岗位工种详细
export function getPost(postId) {
  return request({
    url: '/labour/post/' + postId,
    method: 'get'
  })
}

// 修改岗位工种
export function updatePost(data) {
  return request({
    url: '/labour/post',
    method: 'put',
    data: data
  })
}

// 删除岗位工种
export function delPost(postId) {
  return request({
    url: '/labour/post/' + postId,
    method: 'delete'
  })
}

// 下载岗位工种导入模板
export function downloadPostTemplate() {
  return request({
    url: '/labour/post/downloadTemplate',
    method: 'get'
  })
}
